<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex flex-wrap align-center justify-center benben-position-layout flex experienceValue_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex a lign-center justify-between flex-sub experienceValue_fd0_0'>
          <view class='flex align-center self-center experienceValue_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">
            <text class='fu-iconfont2  experienceValue_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <text class='experienceValue_fd0_0_c1'>经验值</text>
          <view class='flex align-center self-center justify-end experienceValue_fd0_0_c0'
            @tap.stop="popupShow1703749855239=true">
            <image class='experienceValue_fd0_0_c2_c0' mode="aspectFit" :src='STATIC_URL+"45.png"'></image>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-center benben-flex-layout experienceValue_flex_1">
        <text class='experienceValue_fd1_0'>{{dataInfo.exp}}</text>
        <text class='experienceValue_fd1_1'>经验值</text>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout experienceValue_flex_2">
        <view class='flex flex-direction flex-wrap align-stretch experienceValue_fd2_0'>
          <view class='flex flex-wrap align-center experienceValue_fd2_0_c0'>
            <text class='experienceValue_fd2_0_c0_c0'>每日任务</text>
          </view>
          <view class='flex flex-wrap align-center justify-between experienceValue_fd2_0_c1'>
            <view class='flex flex-wrap align-center'>
              <image class='experienceValue_fd2_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"46.png"'></image>
              <view class='flex flex-direction flex-wrap align-start'>
                <view class='flex flex-wrap align-center'>
                  <text class='experienceValue_fd2_0_c0_c0'>今日{{k_q_num}}快问快答</text>
                </view>
                <view class='flex flex-wrap align-center experienceValue_fd2_0_c1_c0_c1_c1'>
                  <text class='experienceValue_fd2_0_c1_c0_c1_c1_c0'>奖励</text>
                  <text class='experienceValue_fd2_0_c1_c0_c1_c1_c0'>{{k_jy}}</text>
                  <text class='experienceValue_fd2_0_c1_c0_c1_c1_c0'>经验值</text>
                </view>
              </view>
            </view>
            <!-- k_in -->
            <button class='experienceValue_fd2_0_c1_c1' v-if="quick==0" @tap.stop="goKuaiIn" data-type="redirectTo"
              :data-url="`/pages/wode/questionAnswer/questionAnswer?num=${k_q_num}&is_q=1`">去完成</button>
            <button class='experienceValue_fd2_0_c1_c1s' v-if="quick==1">已完成</button>
          </view>
          <view class='flex flex-wrap align-center justify-between experienceValue_fd2_0_c1' style="border: none;">
            <view class='flex flex-wrap align-center'>
              <image class='experienceValue_fd2_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"47.png"'></image>
              <view class='flex flex-direction flex-wrap align-start'>
                <view class='flex flex-wrap align-center'>
                  <text class='experienceValue_fd2_0_c0_c0'>今日写</text>
                  <text class='experienceValue_fd2_0_c0_c0'>{{d_q_num}}</text>
                  <text class='experienceValue_fd2_0_c0_c0'>个回答</text>
                </view>
                <view class='flex flex-wrap align-center experienceValue_fd2_0_c1_c0_c1_c1'>
                  <text class='experienceValue_fd2_0_c1_c0_c1_c1_c0'>奖励</text>
                  <text class='experienceValue_fd2_0_c1_c0_c1_c1_c0'>{{d_jy}}</text>
                  <text class='experienceValue_fd2_0_c1_c0_c1_c1_c0'>经验值</text>
                </view>
              </view>
            </view>
            <!-- d_in -->
            <button class='experienceValue_fd2_0_c1_c1' @tap.stop="goDayIn" v-if="day==0" data-type="redirectTo"
              :data-url="`/pages/wode/questionAnswer/questionAnswer?num=${d_q_num}&is_q=0`">去完成</button>
            <button class='experienceValue_fd2_0_c1_c1s' v-if="day==1">已完成</button>
          </view>
        </view>
      </view>
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout experienceValue_flex_2">
        <view class='flex flex-direction flex-wrap align-stretch experienceValue_fd2_0'>
          <view class='experienceValue_fd2_0_c0'>
            <view class='experienceValue_fd2_0_c0_c0'>最近回答</view>
            <view class="text-999 text-sm">查看并补充你的回答</view>
          </view>
          <view class="" v-for="(item,index ) in dataList" @tap.stop="handleJumpDiy" :key='key0' data-type="navigateTo"
            :data-url="`/pages/shouye/postquestionsDetails/postquestionsDetails?id=${item.aid}`">
            <view class="text-cut container">{{item.title}}</view>
          </view>
          <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
            :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
        </view>
      </view>
      <!---flex布局flex布局结束-->
      <benben-popup v-model="popupShow1703749855239" :mask="true" :mask-close-able="false" mode='center' :z-index='999'>
        <!---富文本弹窗flex布局开始-->
        <view class="flex flex-direction flex-wrap align-center benben-flex-layout">
          <view class='flex flex-direction flex-wrap align-stretch experienceValue_fd3_0'>
            <text class='experienceValue_fd3_0_c0'>规则</text>

            <scroll-view class='experienceValue_fd3_0_c1' :scroll-y='true'>
              <view class='flex flex-direction align-stretch benben-scroll flex'>
                <jyf-parser class='experienceValue_fd3_0_c1_c0' :html="dataMessage.content | richTextFormat">
                </jyf-parser>
              </view>
            </scroll-view>

          </view>
          <image class='experienceValue_fd3_1' mode="aspectFit" :src='STATIC_URL+"111.png"'
            @tap.stop="popupShow1703749855239=false"></image>
        </view>

        <!---富文本弹窗flex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js';
  import pagingList from '@/common/mixin/paging_list.js';

  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "popupShow1703749855239": false,
        "dataMessage": {
          "aid": "",
          "name": "",
          "thumb_img": "",
          "content": "",
          "introduce": ""
        },
        "dataInfo": {
          "invite_code": "",
          "address": "",
          "address_code": "",
          "hobby": "",
          "tags": "",
          "id": "",
          "userlevel_id": "",
          "mobile": "",
          "real_name": "",
          "avatar": "",
          "account": "",
          "email": "",
          "birthday": "",
          "gender": "",
          "create_time": "",
          "user_money": "",
          "freeze_money": "",
          "total_consumption_money": "",
          "score": "",
          "_mobile": "",
          "coupon": "",
          "collection_count": "",
          "browse_count": "",
          "total_money": "",
          "certified": "",
          "nickname": "",
          "is_pay_password": "",
          "follow_count": "",
          "is_close": "",
          "exp": "",
          "area_code": "",
          "jianjie": "",
          "level_name": "",
          "next_need_exp": "",
          "support_num": "",
          "follow_num": "",
          "fans_num": "",
          "user_label": [],
          "is_school": ""
        },
        quick: 0,
        day: 0,
        d_q_num: 0,
        d_jy: 0,
        k_jy: 0,
        k_q_num: 0,
        d_in: 0,
        k_in: 0,
        dataList: []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.getMessageFunc()
      this.getUserFunc()
      this.getListFunc()

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getInfo()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      getListFunc() {
        this.minixPagingListsApi = global.apiUrls.post66a996ecc0056;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {

        }
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();
      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      },
      goDayIn() {
        if (this.d_in != 0) {
          uni.redirectTo({
            url: `/pages/wode/questionAnswer/questionAnswer?num=${this.d_q_num}&is_q=0`
          })
        } else {
          this.$message.info('暂时没有足够的问题，请稍后再试')
        }
      },
      goKuaiIn() {
        if (this.k_in != 0) {
          uni.redirectTo({
            url: `/pages/wode/questionAnswer/questionAnswer?num=${this.k_q_num}&is_q=1`
          })
        } else {
          this.$message.info('暂时没有足够的问题，请稍后再试')
        }
      },
      // getList
      getInfo() {
        this.$api.post(global.apiUrls.post657abef8c82ff, {}).then(res => {
          if (res.data.code == 1) {
            this.day = res.data.data.day
            this.quick = res.data.data.quick
            this.k_jy = res.data.data.k_jy
            this.d_q_num = res.data.data.d_q_num
            this.d_jy = res.data.data.d_jy
            this.k_q_num = res.data.data.k_q_num
            this.d_in = res.data.data.d_in
            this.k_in = res.data.data.k_in
          }
        })
      },
      //获取签到规则
      async getMessageFunc() {
        //请求方法
        //数据验证

        let datadataMessage = await this.$api.get(global.apiUrls.post641568f1b6f87, {
          column_id: '20'
        });

        if (datadataMessage.data.code != 1) {
          this.$message.info(datadataMessage.data.msg);
          return
        }
        let infodataMessage = datadataMessage.data;
        this.dataMessage = infodataMessage.data

      },
      //获取会员
      async getUserFunc() {
        //请求方法
        //数据验证

        let datadataInfo = await this.$api.get(global.apiUrls.post5c78c4772da97, {

        });

        if (datadataInfo.data.code != 1) {
          this.$message.info(datadataInfo.data.msg);
          return
        }
        let infodataInfo = datadataInfo.data;
        this.dataInfo = infodataInfo.data

      }
    }
  };
</script>
<style lang="scss" scoped>
  .container {
    height: 90rpx;
    line-height: 90rpx;
    border-bottom: 2rpx solid #EEEEEE;
    width: 600rpx;
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: url(image-path('44.png')) no-repeat, #F8F8F8;
    background-size: 100% auto;
  }

  .experienceValue_flex_0 {
    background: url(image-path('44.png')) no-repeat;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .experienceValue_fd0_0_c2_c0 {
    width: 44rpx;
    height: 44rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .experienceValue_fd0_0_c1 {
    font-size: 36rpx;
    font-weight: 600;
    line-height: 88rpx;
    color: rgba(255, 255, 255, 1);
  }

  .experienceValue_fd0_0_c0_c0 {
    color: rgba(255, 255, 255, 1);
    font-size: 36rpx;
  }

  .experienceValue_fd0_0_c0 {
    width: 120rpx;
  }

  .experienceValue_fd0_0 {
    height: 88rpx;
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .experienceValue_flex_1 {
    padding: 46rpx 0rpx 56rpx 0rpx;
  }

  .experienceValue_fd1_1 {
    color: #FFFFFF;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 24rpx;
    margin: 6rpx 0rpx 0rpx 0rpx;
  }

  .experienceValue_fd1_0 {
    color: #FFFFFF;
    font-size: 80rpx;
    font-weight: 400;
    line-height: 80rpx;
  }

  .experienceValue_flex_2 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    // margin-bottom: 24rpx;
  }

  .back {
    background: rgba(100, 80, 235, 1);
    border-radius: 33rpx 33rpx 33rpx 33rpx;
    width: 124rpx;
    line-height: 56rpx;
    font-size: 24rpx;
    color: #fff;
  }

  .experienceValue_fd2_0_c1_c1 {
    background: rgba(100, 80, 235, 1);
    border-radius: 33rpx 33rpx 33rpx 33rpx;
    width: 124rpx;
    line-height: 56rpx;
    font-size: 24rpx;
    color: #fff;
  }

  .experienceValue_fd2_0_c1_c1s {
    background: #eee;
    border-radius: 33rpx 33rpx 33rpx 33rpx;
    width: 124rpx;
    line-height: 56rpx;
    font-size: 24rpx;
    color: #333;
  }

  .experienceValue_fd2_0_c1_c0_c1_c1_c0 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .experienceValue_fd2_0_c1_c0_c1_c1 {
    margin: 8rpx 0rpx 0rpx 0rpx;
  }

  .experienceValue_fd2_0_c1_c0_c0 {
    width: 88rpx;
    height: 88rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .experienceValue_fd2_0_c1 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .experienceValue_fd2_0_c0_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .experienceValue_fd2_0_c0 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .experienceValue_fd2_0 {
    background: rgba(255, 255, 255, 1);
    border-radius: 16rpx 16rpx 0 0;
    background-size: 100% 100vh;
    padding: 0rpx 24rpx 0rpx 24rpx;
  }

  .experienceValue_fd3_1 {
    width: 56rpx;
    height: 56rpx;
    border-radius: 28rpx 28rpx 28rpx 28rpx;
  }

  ::v-deep .experienceValue_fd3_0_c1_c0 {
    width: 480rpx;
  }

  .experienceValue_fd3_0_c1 {
    touch-action: none;
    height: 330rpx;
    width: 100%;
  }

  .experienceValue_fd3_0_c0 {
    font-size: 32rpx;
    font-weight: 700;
    color: #333333;
    margin: 40rpx 0rpx 32rpx 0rpx;
    text-align: center;
    line-height: 52rpx;
  }

  .experienceValue_fd3_0 {
    background: rgba(255, 255, 255, 1);
    width: 560rpx;
    border-radius: 24rpx 24rpx 24rpx 24rpx;
    padding: 0rpx 32rpx 45rpx 32rpx;
    margin: 0rpx 0rpx 40rpx 0rpx;
    background-size: 100% auto;
  }
</style>
